<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>RTOS - a cooperative multitasking library: RTOS Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">RTOS - a cooperative multitasking library
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">RTOS Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="RTOS" -->
<p>static class, namespace-like container for <a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> declarations  
 <a href="class_r_t_o_s.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="p_r_t_o_s_8h_source.html">pRTOS.h</a>&gt;</code></p>

<p><a href="class_r_t_o_s-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><b>callback</b></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> private implementation class. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1channel.html">channel</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">waitable data queue  <a href="class_r_t_o_s_1_1channel.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1channel__base.html">channel_base</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> private implementation class.  <a href="class_r_t_o_s_1_1channel__base.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1clock.html">clock</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">free-running clock, ticks at a fixed frequency  <a href="class_r_t_o_s_1_1clock.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1event.html">event</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set of things that can happen, or a thing that has happened  <a href="class_r_t_o_s_1_1event.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1flag.html">flag</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">basic synchronisation mechanism.  <a href="class_r_t_o_s_1_1flag.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1mailbox.html">mailbox</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">synchronous handling over of a data item  <a href="class_r_t_o_s_1_1mailbox.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1mailbox__base.html">mailbox_base</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> private implementation class.  <a href="class_r_t_o_s_1_1mailbox__base.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1mutex.html">mutex</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">mutual execlusion semaphore  <a href="class_r_t_o_s_1_1mutex.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1pool.html">pool</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">place to store and rectrieve data, no built-in synchronisation  <a href="class_r_t_o_s_1_1pool.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1pool__base.html">pool_base</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> private implementation class.  <a href="class_r_t_o_s_1_1pool__base.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1task.html">task</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">an independent thread of execution  <a href="class_r_t_o_s_1_1task.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1timer.html">timer</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">one-short timer  <a href="class_r_t_o_s_1_1timer.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s_1_1waitable.html">waitable</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">abstract thing that a task can wait for  <a href="class_r_t_o_s_1_1waitable.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><b>waitable_set</b></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> private implementation construct. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a354317abf0afae8b4d228eb63e76e71b"></a><!-- doxytag: member="RTOS::run" ref="a354317abf0afae8b4d228eb63e76e71b" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#a354317abf0afae8b4d228eb63e76e71b">run</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">runs the scheduler <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e455e2e010e6af8f9f41cbeacfe6bd0"></a><!-- doxytag: member="RTOS::current_task" ref="a7e455e2e010e6af8f9f41cbeacfe6bd0" args="(void)" -->
static <a class="el" href="class_r_t_o_s_1_1task.html">task</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#a7e455e2e010e6af8f9f41cbeacfe6bd0">current_task</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">returns (a pointer to) the currently executing task <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc4aa432c2d87f5a62f13584458f899c"></a><!-- doxytag: member="RTOS::run_time" ref="adc4aa432c2d87f5a62f13584458f899c" args="(void)" -->
static unsigned long long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#adc4aa432c2d87f5a62f13584458f899c">run_time</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get elapsed time in micro seconds since OS startup <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7616a0f527019fe03f5ffbe590e3fae6"></a><!-- doxytag: member="RTOS::print" ref="a7616a0f527019fe03f5ffbe590e3fae6" args="(std::ostream &amp;stream)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#a7616a0f527019fe03f5ffbe590e3fae6">print</a> (std::ostream &amp;stream)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">prints statistics about the tasks to the stream. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#aa9b2602178a340b2ad59ca82d4b09b5e">statistics_clear</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">clears the statistics.  <a href="#aa9b2602178a340b2ad59ca82d4b09b5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a445fcf261e2be2d7b09036001cc814"></a><!-- doxytag: member="RTOS::display_statistics" ref="a5a445fcf261e2be2d7b09036001cc814" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#a5a445fcf261e2be2d7b09036001cc814">display_statistics</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">print the statistics <br/></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a652c85c18e3a82a8fdd9ccd5bc1abd47"></a><!-- doxytag: member="RTOS::timerISR" ref="a652c85c18e3a82a8fdd9ccd5bc1abd47" args="(void)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_o_s.html#a652c85c18e3a82a8fdd9ccd5bc1abd47">timerISR</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">the timer interrupt, updates runTime and ElapsedTime <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>static class, namespace-like container for <a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> declarations </p>
<p>The <a class="el" href="class_r_t_o_s.html" title="static class, namespace-like container for RTOS declarations">RTOS</a> is a static class, instatiation is not needed. After creating the tasks, call <a class="el" href="class_r_t_o_s.html#a354317abf0afae8b4d228eb63e76e71b" title="runs the scheduler">RTOS::run()</a> to start the scheduling the tasks. <a class="el" href="class_r_t_o_s.html#a354317abf0afae8b4d228eb63e76e71b" title="runs the scheduler">RTOS::run()</a> will never return. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa9b2602178a340b2ad59ca82d4b09b5e"></a><!-- doxytag: member="RTOS::statistics_clear" ref="aa9b2602178a340b2ad59ca82d4b09b5e" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void RTOS::statistics_clear </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>clears the statistics. </p>
<p>The actual clearing will be done later, inside <a class="el" href="class_r_t_o_s.html#a354317abf0afae8b4d228eb63e76e71b">run()</a>, when the current task has given up the processor. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="p_r_t_o_s_8h_source.html">pRTOS.h</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sat Apr 14 2012 15:59:27 for RTOS - a cooperative multitasking library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
